<HTML><HEAD><TITLE>chr_opium</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(chr)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>chr_opium</H1>
Activates the Opium debugger and shows constraint handling.


<DL>
</DL>
<H2>Description</H2>
   In order to use the Opium debugger, the debug_compile flag must have
   been on (default) during compilation (chr to pl) and loading of the
   produced ECLiPSe  code.  The query chr_opium.  opens an Opium window in
   which the ECLiPSe  code will be traced.  The library chr_opium will be
   automatically loaded.  Note that the Opium debugger for constraint
   handling rules works with X graphic interface.  The OPIUM_WINDOW
   environment variable must thus be set.  An Opium execution can be
   aborted using the a.  command in Opium.

<P>
   Both debuggers display user-defined constraints and application of
   constraint handling rules.  In the Opium debugger, this information
   corresponds to additional ports of the debugger.  The additional ports
   are:

<P>
  * add:  A new constraint is added to the constraint store.

<P>
  * already_in:  A constraint to be added was already present.

<P>
   The ports related to application of rules are:

<P>
  * try_rule:  A rule is tried.

<P>
  * delay_rule:  The last tried rule cannot fire because the guard did not
    succeed.

<P>
  * fire_rule:  The last tried rule fires.

<P>
   The ports related to labeling are:
  * try_label:  A label_with declaration is checked.

<P>
  * delay_label:  The last label_with declaration delays because the guard
    did not succeed.

<P>
  * fire_label:  The last tried label_with declaration succeeds, so the
    clauses of the associated constraint will be used for built-in
    labeling.

<P>
   When displayed, each constraint is labeled with a unique integer
   identifier.  Each rule is labeled with its name as given in the chr
   source using the @ operator.  If a rule does not have a name, it is
   displayed together with a unique integer identifier.

<P>
   See the extension manual chapter on constraint handling rules for more
   information on the Opium scenario used for debugging.

<P>

<H3>Fail Conditions</H3>
   None.


<H3>Resatisfiable</H3>
   No.
<H2>See Also</H2>
<A HREF="../../lib/chr/chr_trace-0.html">chr_trace / 0</A>, <A HREF="../../lib/chr/chr_notrace-0.html">chr_notrace / 0</A>
</BODY></HTML>
